//
//  DocumentThumbView.h
//  Documents
//
//  Created by Alex Di Mango 
//  Copyright (c) 2012 Whardoo.com -  All rights reserved.
//

#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import "ComparatorManager.h"
#import "MyDocument.h"
#import "ReaderViewController.h"


@protocol DraggableDocumentThumbViewDelegate <NSObject>

-(void)dragAndDropThumbViewController:(UIView *)ddtvc draggingGestureWillBegin:(UIGestureRecognizer *)gesture forThumb:(UIView *)doc;
-(void)dragAndDropThumbViewController:(UIView *)ddtvc draggingGestureDidBegin:(UIGestureRecognizer *)gesture forThumb:(UIView *)doc;
-(void)dragAndDropThumbViewController:(UIView *)ddtvc draggingGestureDidMove:(UIGestureRecognizer *)gesture;
-(void)dragAndDropThumbViewController:(UIView *)ddtvc draggingGestureDidEnd:(UIGestureRecognizer *)gesture;

-(UIView *)dragAndDropThumbViewControllerView:(UIView *)ddtvc;
-(id)dragAndDropThumbViewControllerSelectedItem;

@end  


@protocol DroppableDocumentThumbViewDelegate <NSObject>

-(void)dragAndDropThumbViewController:(UIView<DraggableDocumentThumbViewDelegate> *)ddtvc droppedGesture:(UIGestureRecognizer *)gesture;

@end  


@interface DocumentThumbView: UIView<DraggableDocumentThumbViewDelegate,UIGestureRecognizerDelegate, MFMailComposeViewControllerDelegate,UIDocumentInteractionControllerDelegate, UIWebViewDelegate>{
UIViewController *parentController;
}
@property (nonatomic,retain)NSString *docId;
@property (nonatomic,retain)UIImageView *docImage;
@property (nonatomic,retain)UIImageView *docMarked;
@property (nonatomic,retain)UIImageView *docRefImage;
@property (nonatomic,retain)UILabel *docName;
@property (retain, nonatomic) UIWebView *webView;
@property (nonatomic, retain) UIView <DroppableDocumentThumbViewDelegate> *droppableDelegate;
@property (nonatomic, retain) UIView *dragAndDropView;
@property (nonatomic, strong) UIActivityIndicatorView *activityView;
@property BOOL loadedWebView;
@property (nonatomic,retain)UIButton *swipeButtonR;
@property (nonatomic,retain)UIButton *swipeButtonL;
@property BOOL deletingShow;
@property BOOL renamingShow;
@property BOOL isScrolling;

-(void)getMSThumb:(NSURL *)documentURL;
-(void)drawSelectionRect;
-(void)showDocument: (NSNumber *)fileId;

@end

